package principal;

import interfaces.Activator;
import net.KohonenMaps;


public class PrincipalAutoAssociativa {
	public static void main(String[] args) {
		KohonenMaps rede = new KohonenMaps(63, 25);
		rede.setSubstitutionRules(new char[]{'.','#'},new Number[]{-1,1});
		rede.addSample("fontes/a.txt","A1");
		rede.addSample("fontes/a2.txt","A2");
		rede.addSample("fontes/a3.txt","A3");
		rede.addSample("fontes/b.txt","B1");
		rede.addSample("fontes/b2.txt","B2");
		rede.addSample("fontes/b3.txt","B3");
		rede.addSample("fontes/c.txt","C1");
		rede.addSample("fontes/c2.txt","C2");
		rede.addSample("fontes/c3.txt","C3");
		rede.addSample("fontes/d.txt","D1");
		rede.addSample("fontes/d2.txt","D2");
		rede.addSample("fontes/d3.txt","D3");
		rede.addSample("fontes/e.txt","E1");
		rede.addSample("fontes/e2.txt","E2");
		rede.addSample("fontes/e3.txt","E3");
		rede.addSample("fontes/j.txt","J1");
		rede.addSample("fontes/j2.txt","J2");
		rede.addSample("fontes/j3.txt","J3");
		rede.addSample("fontes/k.txt","K1");
		rede.addSample("fontes/k2.txt","K2");
		rede.addSample("fontes/k3.txt","K3");
		rede.setActivator(new Activator() {
			
			@Override
			public Number doActivation(Number x) {
				return x;
			}

			@Override
			public Number functionDerived(Number x) {
				// TODO Auto-generated method stub
				return null;
			}
		});
		rede.setReductionMode(KohonenMaps.LINEAR_REDUCTION);
		rede.setLearningRate(0.6);
		rede.setAdjusteFactor(0.01);
		rede.setMinLearningRate(0.01);
		rede.setIterations(100);
		rede.setRadius(7);
		rede.classify();

	
		
		
	}
}
